Skip to content

Conversation

@sameerasw
Copy link
Owner

This pull request improves how icons are handled and displayed in the DIY automation UI, making the icon rendering more robust against missing or invalid resources. It also makes a small change to the Action interface for consistency.

Improvements to icon handling:

  • Added validation logic in AutomationItem and ActionItem composables to ensure the icon resource is of type drawable and to fall back to a default icon (R.drawable.rounded_do_not_disturb_on_24) if the provided icon is invalid or missing. This prevents crashes from invalid icon references and improves UI stability. [1] [2]
  • Imported LocalContext in AutomationItem.kt to support the new icon validation logic.

Code consistency:

  • Updated the DimWallpaper action in Action.kt to use property getters for title and icon instead of fixed values, aligning with best practices for property initialization.

@sameerasw sameerasw self-assigned this Jan 14, 2026
@sameerasw sameerasw added the bug Something isn't working label Jan 14, 2026
@sameerasw sameerasw merged commit 3ef9b64 into main Jan 14, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in Essentials Progress Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants